#pragma once
//#include <Ogre.h>
#include <map>
#include "GameObject.h"
//class GameObjectManager{
//public:
//    virtual class GameObject* createGameObject(const std::string &type, const std::string &name) = 0;
//    virtual void destroyGameObject(const std::string &type, const std::string &name) = 0;
//};
class CSTGObjectManager:/* public GameObjectManager,*/ public Ogre::Singleton<CSTGObjectManager> {
public:
    /*virtual*/  GameObject* createGameObject(const std::string &type, const std::string &name);
    /*virtual*/ void destoryGameObject(const std::string &type, const std::string &name);
    //virtual  void loadAllGameObject();
    /*virtual*/ GameInst* createWeaponInst(const std::string &weaponType, const std::string &name = "");
    //CBarrage* createBarrage()
    void loadAll();
protected:
    typedef std::map<std::string, GameObject*> ObjectDictionary;
    //typedef std::map<std::string, ObjectDictionary*> TypeDictionary;
    ObjectDictionary mWeapons;
    ObjectDictionary mPlayers;
    ObjectDictionary mNPCs;
    ObjectDictionary mSkills;
};